using System;
using System.Collections.Generic;
using System.Linq;

namespace CardPlay.Model.Primitives
{
    public static class Enum<T>
    {
        public static T Parse(string value, bool ignoreCase = true)
        {
            return (T)Enum.Parse(typeof(T), value, ignoreCase);
        }

        public static IEnumerable<T> Values
        {
            get { return Enum.GetValues(typeof (T)).Cast<T>(); }
        }
    }
}